package com.egao.common.module.cooperative.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.egao.common.core.web.JsonResult;
import com.egao.common.core.web.PageParam;
import com.egao.common.module.cooperative.entity.CooperativeProjectActivityStudent;
import com.egao.common.module.cooperative.entity.vo.CooperativeProjectActivityStudentListVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 产教融合 学生活动service
 * @author root
 */
public interface CooperativeProjectActivityStudentService extends IService<CooperativeProjectActivityStudent> {

    /**
     * 项目分页列表
     * @param page
     * @return
     */
    List<CooperativeProjectActivityStudentListVO> listPage(PageParam<CooperativeProjectActivityStudent> page);

    /**
     * 查询学生报名活动信息
     * @param activityId 活动ID
     * @param studentId 学生ID
     * @return
     */
    CooperativeProjectActivityStudent getById(Integer activityId, Integer studentId);

    /**
     * 活动报名人数
     * @param activityId 活动ID
     * @return
     */
    Integer countApply(Integer activityId);

    /**
     * 活动列表
     * @param page
     * @return
     */
    List<CooperativeProjectActivityStudentListVO> listActivityPage(PageParam<CooperativeProjectActivityStudent> page);

    /**
     * 报名
     * @param cooperativeProjectActivityStudent
     * @return
     */
    JsonResult apply(CooperativeProjectActivityStudent cooperativeProjectActivityStudent);

    /**
     * 取消报名
     * @param cooperativeProjectActivityStudent
     * @return
     */
    JsonResult cancel(CooperativeProjectActivityStudent cooperativeProjectActivityStudent);

    /**
     * 导入签到
     * @param file 导入excel
     * @param cooperativeProjectActivityId 活动ID
     * @return
     */
    JsonResult importStudent(MultipartFile file, Integer cooperativeProjectActivityId);

}
